-
Notifications
You must be signed in to change notification settings - Fork 1k
Assigning literal values to NUM_DIGITAL_PINS and NUM_ANALOG_INPUTS #206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assigning literal values to NUM_DIGITAL_PINS and NUM_ANALOG_INPUTS #206
Conversation
Thanks @lacklustrlabs |
imho it would be easiest to add the first PIN_AX variant:
I can do that, but the question is where do you want it? |
Thanks @lacklustrlabs |
Use _Static_assert instead of static_assert Cosmetic change Signed-off-by: Frederic Pillon <[email protected]>
Use _Static_assert instead of static_assert Cosmetic change Signed-off-by: Frederic Pillon <[email protected]>
6e74479
to
c784d36
Compare
cores/arduino/pins_arduino_var.h
Outdated
@@ -25,14 +25,16 @@ | |||
// Include board variant | |||
#include "variant.h" | |||
|
|||
// Avoid pins number misalignment | |||
_Static_assert(NUM_DIGITAL_PINS==PEND, "NUM_DIGITAL_PINS and PEND differ!"); | |||
_Static_assert(NUM_ANALOG_INPUTS==(AEND-A0), "NUM_DIGITAL_PINS and (AEND-A0) differ!"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry made a wrong copy/paste
"NUM_DIGITAL_PINSNUM_ANALOG_INPUTS and (AEND-A0) differ!"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem :)
c784d36
to
f697d25
Compare
…-and-NUM_ANALOG_INPUTS Assigning literal values to NUM_DIGITAL_PINS and NUM_ANALOG_INPUTS
It turned out that I needed the fix of #140 for a pet project of mine.
So here are the changes I made.
I've compiled every board with this .ino: